package com.example.auth.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.auth.entity.SysRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.auth.entity.SysRoleMenu;
import com.example.auth.entity.SysUserRole;
import com.example.auth.entity.dto.SysRoleQueryDTO;
import com.example.auth.entity.vo.SysRoleQueryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author SIE
* @description 针对表【sys_role(角色)】的数据库操作Mapper
* @createDate 2023-07-07 13:05:31
* @Entity com.example.auth.entity.SysRole
*/
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {

    Page<SysRoleQueryVO> selectRolePage(Page<SysRoleQueryVO> sysRolePage, @Param("sysRoleQueryDTO") SysRoleQueryDTO sysRoleQueryDTO);

    void removeRoleUserById(@Param("roleId") Long id);

    void updateRoleStatus(@Param("roleId") Long roleId, @Param("status") Long status);

    List<SysRoleMenu> selectRoleMenuByRoleId(@Param("roleId") Long roleId);

    void deleteRoleMenuByRoleId(@Param("roleId") Long roleId);

    void insertBatch(@Param("roleId") Long roleId, List<Long> menuIdList);

    void batchRemoveRoleUserById(List<Long> idList);

    void batchDeleteRoleMenuByRoleId(List<Long> idList);
}




